import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.yh.st.core.domain.TestDemo;
import cn.yh.st.core.service.TestDemoService;

@RunWith(value = SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext.xml" })
public class SpringTestDemo {

	@Resource
	private TestDemoService testDemoService;

	@Test
	public void testDemo() {
		TestDemo x = testDemoService.getByName(1);
		System.out.println(x.getUserName());
	}
}
